package com.example.controller;

import com.example.annotation.rest.AnonymousGetMapping;
import com.example.pojo.ResultVo;
import com.example.service.CountChartService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/indexcontroller")
@CrossOrigin
@Api("首页")
public class IndexOneController {

    @Autowired
    private CountChartService service;
    // 查询每门课程考试最高分

    @AnonymousGetMapping("/getMaxAndMinChart")
    @ApiOperation("首页图表")
    public ResultVo getMaxAndMinChart(){
        return service.getMaxAndMinChart();
    }


}
